package com.exercise.widgets.menu

import android.content.Context
import android.content.Intent
import android.view.LayoutInflater
import com.exercise.struct.base.BaseActivity
import com.exercise.struct.viewmodel.BaseViewModel
import com.exercise.widgets.databinding.ActivityMenuBinding

class MenuActivity : BaseActivity<BaseViewModel, ActivityMenuBinding>() {
    override val bindingInflater: (LayoutInflater) -> ActivityMenuBinding
        get() = ActivityMenuBinding::inflate
    override val modelClass: Class<BaseViewModel>
        get() = BaseViewModel::class.java

    override fun initData() {
    }

    override fun initView() {
        binding.btnOptionMenu.setOnClickListener {
            OptionMenuActivity.start(this)
        }
        binding.btnContextnMenu.setOnClickListener {
            ContextMenuActivity.start(this)
        }
        binding.btnPopMenu.setOnClickListener {
            PopMenuActivity.start(this)
        }
    }

    companion object {
        fun start(context: Context) {
            Intent(context, MenuActivity::class.java).also {
                context.startActivity(it)
            }
        }
    }

}